import { createRouter, createMemoryHistory } from 'vue-router'
import Home1Vue from '@/views/Home1.vue'
import SellerVue from '@/views/Seller.vue'//卖家中心

import CommodityVue from '../views/selfdraw/Commodity.vue'//商品
import OrderVue from '@/views/selfdraw/Order.vue'//订单
import RepertoryVue from '../views/selfdraw/Repertory.vue'//库存
import AfterSaleVue from '@/views/selfdraw/AfterSale.vue'//售后
/* const Selfdraw = () => import('@/views/selfdraw')
const Commodity = () => import('@/views/selfdraw/Commodity.vue') */


import GameListVue from '@/views/initial/GameList.vue'//游戏列表
import InventoryVue from '@/views/initial/Inventory.vue'//库存管理
import OrderListVue from '@/views/initial/OrderList.vue'// 订单列表

import AccountBalanceVue from '@/views/account/AccountBalance.vue'//账户余额


const routes = [
    {
        path: '/', component: Home1Vue, redirect: '/vews/seller',
        children: [

            // ※敲重点※老是忘 : path路径自己写，和home里index对应。component和import命名对应

            { path: '/vews/seller', component: SellerVue },
            // 自抽号
            { path: '/selfdraw/commodity', component: CommodityVue, },
            { path: '/selfdraw/order', component: OrderVue },
            { path: '/selfdraw/repertory', component: RepertoryVue },
            { path: '/selfdraw/afterSale', component: AfterSaleVue },
            // 初始号
            { path: '/initial/gameList', component: GameListVue },
            { path: '/initial/inventory', component: InventoryVue },
            { path: '/initial/orderList', component: OrderListVue },
            // 账户余额
            { path: '/account/balance', component: AccountBalanceVue }
        ]
    }

]

const router = createRouter({
    history: createMemoryHistory(),
    routes,
})
export default router;